package com.example.logisticsingle.model;

import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.command.BaseModel;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.sql.Date;

/**
 * 用户信息

 *
 */
@Data
@EqualsAndHashCode(callSuper=false)
public class User extends BaseModel {
    /**
     *
     */
    private static final long serialVersionUID = -4230239210600792856L;
    /**
     * 用户ID
     */
    @Column(name = "id",type = MySqlTypeConstant.BIGINT,length = 20,isKey = true,isAutoIncrement = true,comment = "ID")
    protected long id;
    /**
     * 用户名
     */
    @Column(name = "user_name",type = MySqlTypeConstant.VARCHAR,length = 30,isNull = false,comment = "用户名")
    protected String userName;
    /**
     * 密码
     */
    @Column(name = "password",type = MySqlTypeConstant.VARCHAR,length = 100,defaultValue = "",comment = "密码")
    protected String password;
    /**
     * 盐加密
     */
    @Column(name = "salt",type = MySqlTypeConstant.VARCHAR,length = 20,defaultValue = "",comment = "盐加密")
    protected String salt;
    /**
     * 帐号状态（0正常 1停用）
     */
    @Column(name = "status",type = MySqlTypeConstant.CHAR,length = 20,defaultValue = "0",comment = "帐号状态（0正常 1停用）")
    protected char status='0';
    /**
     * 手机号码
     */
    @Column(name = "mobile_no",type = MySqlTypeConstant.VARCHAR,length = 15,comment = "手机号码")
    protected String mobileNo;
    /**
     * 用户邮箱
     */
    @Column(name = "email",type = MySqlTypeConstant.VARCHAR,length = 30,comment = "邮箱")
    protected String email;
    /**
     * 用户性别（0男 1女 2未知）
     */
    @Column(name = "sex",type = MySqlTypeConstant.CHAR,length = 1,defaultValue = "0",comment = "用户性别（0男 1女 2未知）")
    protected char sex = '0';
    /**
     * 删除标志（0代表存在 2代表删除）
     */
    @Column(name = "delFlag",type = MySqlTypeConstant.CHAR,length = 1,defaultValue = "0",comment = "删除标志（0代表存在 1代表删除）")
    protected char delFlag = '0';
    /**
     * 最后登陆IP
     */
    @Column(name = "last_login_ip",type = MySqlTypeConstant.VARCHAR,length = 30,defaultValue = "0",comment = "最后登陆IP")
    protected String lastLoginIp;
    /**
     * 最后登陆时间
     */
    @Column(name = "last_login_time",type = MySqlTypeConstant.TIMESTAMP,comment = "最后登陆时间")
    protected Date lastLoginTime;
    /**
     * 创建者ID
     */
    @Column(name = "create_user_id",type = MySqlTypeConstant.BIGINT,length = 20,comment = "创建者ID")
    protected long createUserId;
    /**
     * 创建时间
     */
    @Column(name = "create_time",type = MySqlTypeConstant.TIMESTAMP,comment = "创建时间")
    protected Date createTime;
    /**
     * 更新者ID
     */
    @Column(name = "update_user_id",type = MySqlTypeConstant.BIGINT,length = 20,comment = "创建者ID")
    protected Date updateUserId;
    /**
     * 更新时间
     */
    @Column(name = "update_time",type = MySqlTypeConstant.TIMESTAMP,comment = "更新时间")
    protected Date updateTime;
    /**
     * 备注
     */
    @Column(name = "remark",type = MySqlTypeConstant.VARCHAR,length = 500,comment = "更新时间")
    protected String remark;

}
